//
//  LKYearViewController.m
//  YLHelper
//
//  Created by she1323 on 2018/5/18.
//  Copyright © 2018年 she1323. All rights reserved.
//

#import "LKYearViewController.h"
#import "LKDoubuleBarView.h"

@interface LKYearViewController ()


@end

@implementation LKYearViewController

-(RACSubject *)pushSubject{
    if (!_pushSubject) {
        _pushSubject = [RACSubject subject];
    }
    return _pushSubject;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    self.view.backgroundColor = [UIColor whiteColor];
    UIView *topView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, WIDTH, 12)];
    [self.view addSubview:topView];
    topView.backgroundColor = cellHeaderBgColor;
    LKDoubuleBarView *view = [LKDoubuleBarView creteDoubleViewWithFrame:CGRectMake(19, 12, WIDTH - 38, 500) andLineValues:@[@[@"2.24", @"16.79", @"14.54", @"2.25", @"23"],@[@"9.29", @"7.79", @"4.54", @"12.25", @"3"],@[@"-6.24", @"6.79", @"6.54", @"9.25", @"-3"]] andBarValues:@[@[@"23.8", @"27.46", @"31.13", @"40.68", @"28.85"],@[@"23.8", @"27.46", @"31.13", @"20.68", @"28.85"]] andXvalue:@[@"2012-05",@"2012-06",@"2012-07",@"2012-08",@"2012-09"] AndShowRightAxis:YES AndLinesClors:@[COLOR_HEX(0x98E3E4),COLOR_HEX(0xCCBEE8),COLOR_HEX(0x5F80D1)] AndBarColors:@[COLOR_HEX(0x98E3E4),COLOR_HEX(0xCCBEE8)] AndLineNames:@[@"L",@"B",@"J"] AndBarNames:@[@"菜鸟",@"蜂鸟"]];
    [self.view addSubview:view];
    LKBaseButton *paixuBtn = [LKBaseButton buttonWithFrame:CGRectZero type:UIButtonTypeCustom title:@"查看排名 ->" titleColor:blueDefault layercorne:0 font:[UIFont systemFontOfSize:12] backgroudColor:[UIColor whiteColor] AndActionBlock:^(UIButton *btn) {
        [_pushSubject sendNext:@""];
    }];
    [self.view addSubview:paixuBtn];
    [paixuBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(view.mas_bottom).offset(27);
        make.right.equalTo(self.view).offset(-23);
        make.size.mas_equalTo(CGSizeMake(76, 23));
    }];
    paixuBtn.layer.borderColor = blueDefault.CGColor;
    paixuBtn.layer.borderWidth = 1;
    // Do any additional setup after loading the view.
}


/**
 测试RAC的API
 */
-(void)testRACAPI{
    
    RACSignal *testSignal = [RACSignal createSignal:^RACDisposable * _Nullable(id<RACSubscriber>  _Nonnull subscriber) {
        [subscriber sendNext:@""];
        [subscriber sendCompleted];
        return [RACDisposable disposableWithBlock:^{
            
        }];
    }];
    [testSignal subscribeNext:^(id  _Nullable x) {
        
    }];
    [testSignal subscribeError:^(NSError * _Nullable error) {
        
    }];

}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
